<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/8/12 0012
 * Time: 14:24
 */

namespace common\models\RegionManagerInfo;


use common\models\Admin\Admin;

class RegionManagerInfo extends RegionManagerInfoBase
{
    public function rules()
    {
        return array_merge(parent::rules(), [
         //   ["ali_account", "match", "pattern" => DataHelper::patternMobile(), "message" => "不是一个手机号"],
            ["name", "match", "pattern" => '/^[\x7f-\xff]+$/', "message" => "名称必须是汉字"],
            ///[\x7f-\xff]/
        ]); // TODO: Change the autogenerated stub
    }

    public function getAccountInfo()
    {
        return $this->hasOne(Admin::class, [
            "id" => "uid"
        ]);
    }
}